﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Entities.Modules.Actions;
using DotNetNuke.Services.Localization;
using DotNetNuke.Framework;

namespace DotNetNuke.AjaxSearch
{
    public partial class AjaxSearchUserControl : PortalModuleBase, IActionable
    {
        #region [Event Handlers]

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
                if (jQuery.IsInstalled)
                    jQuery.RequestRegistration();

        }

        #endregion

        #region [IActionable Members]

        /// <summary>
        /// Gets the module actions.
        /// </summary>
        /// <value>The module actions.</value>
        public ModuleActionCollection ModuleActions
        {
            get
            {
                ModuleActionCollection Actions = new ModuleActionCollection();
                Actions.Add(GetNextActionID(), Localization.GetString(ModuleActionType.AddContent, this.LocalResourceFile),
                   ModuleActionType.AddContent, "", "add.gif", EditUrl(), false, DotNetNuke.Security.SecurityAccessLevel.Edit,
                    true, false);
                return Actions;
            }
        }

        #endregion
    }
}